<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('home', 'HomeController@index');
// Route::get('default', 'IndexController@index');

Route::get('/','IndexController@index');
Route::get('/test','IndexController@test');
Route::get('/data','Mall\Order@index');
// Route::get('/dbtest','IndexController@dbtest');

//极验验证
Route::get('auth/geetest','Auth\AuthController@getGeetest');
Route::get('auth/postValidate','Auth\AuthController@postValidate');

Route::any('admin/login','Admin\IndexController@login');
// Route::any('admin/crypt','Admin\IndexController@crypt');

Route::group(['prefix' => 'admin','namespace' => 'Admin','middleware' => 'admin.login'],function(){
	//多个中间件应该如下:
	//'middleware' => ['admin.login','some.other','web']
	//需要注意是反斜杠
	Route::get('/index','IndexController@index');
	Route::any('/logout','IndexController@logout');
	Route::any('/set_pass','IndexController@setPass');
	
	//资源路由 php artisan route:list 可以查看资源路由列表
	Route::resource('article','ArticleController');

	//文章分类管理资源路由
	Route::resource('category', 'CategoryController');
});

